﻿import base.*;
import ui.*;
import objects.*;
class base.base extends MovieClip
{
	//
	//text
	static var windowFormat:TextFormat;
	static var pluginFormat:TextFormat;
	//
	//colour
	static var blue:Number = 1287332;
	static var white:Number = 16777215;
	static var black:Number = 000000;
	static var orange:Number = 13191700;
	static var red:Number = 11210768;
	static var green:Number = 3975750;
	static var grey:Number = 9803157;

	//
	//Function used in app to send trace to this
	//
	public static function trace (text:Object)
	{
		var theParams:Array = arguments.splice(1, arguments.length-1);
		var lc:LocalConnection = new LocalConnection ();
		lc.send ('tracelog', 'tracer', text, theParams);
	}
	//
	// Start Point
	//
	public static function startPoint(__container:MovieClip, theType:String)
	{
		//Stuff for the stage
		Stage.scaleMode = "noScale";
		Stage.align = "cc";
		switch (theType)
		{
			case "listener" :
				createTextFormats ();
				plugins.initialiseBroadcaster();
				__container.plugin1 = new plugins("test 1");
				__container.plugin2 = new plugins("test 2");
				__container.plugin3 = new plugins("test 3");
				plugins.createClips();
				break;
		}
	}
	public static function createTextFormats ()
	{
		//
		//
		//windowFormat
		//	font used on text fields in windows
		windowFormat = new TextFormat ();
		windowFormat.font = "Verdana";
		windowFormat.size = 12;
		windowFormat.align = "center";
		//
		//
		//pluginFormat
		//	plugin names on the plugin objects
		pluginFormat = new TextFormat ();
		pluginFormat.font = "Verdana";
		pluginFormat.size = 9;
		pluginFormat.align = "left";
		pluginFormat.bold = true;
	}
}
